package aryn.framework.graphic;

import java.awt.image.BufferedImage;
import java.io.File;
import java.io.IOException;

import javax.imageio.ImageIO;

public class Save {

	public static void Image(String filePath, BufferedImage img, String extension) {
		File file = new File(filePath);
		try {
			ImageIO.write(img, extension, file);
		} catch (IOException e) {
			System.out.println("Couldn't open the file: "+filePath);
			e.printStackTrace();
		}
	}
	
	public static void Image(String filePath, BufferedImage img) {
		Image(filePath, img, "jpg");
	}
}
